home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 9 / Night Owl CD-ROM (NOPV9) (Night Owl Publisher) (1993).ISO / 038a / 16550u.zip / 16550.DOC next >
Text File  |  1993-03-11  |  12KB  |  265 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.                            16550 - A UART Control Program
  8.                                    Version 1.0
  9.  
  10.  
  11.           DESCRIPTION:
  12.  
  13.             16550 is a shareware program designed to allow the 'unlocking'
  14.           of the internal fifo buffer present in the UART chip of the same
  15.           name. The program will scan all four COM ports (COM1: - COM4:)
  16.           available on the PC and report the presence (if any...) of the
  17.           16550 UART. The user may optionally set the various parameters
  18.           necessary to utilize this buffered mode of operation.
  19.  
  20.           DISCUSSION:
  21.  
  22.             The original PC serial interface specification utilized the
  23.           8250 Programmable Communications Interface, or UART. This device
  24.           converts data from the microprocessor into a format that is
  25.           easily transmittable via a single-wire connection. To accomplish
  26.           this task, the UART takes data from the computer in a parallel
  27.           format (ie: the bits are presented side-by-side) and shifts them
  28.           out via a single pin in a serial (one bit directly after another,
  29.           daisy-chain fashion) data stream. Various extra bits are added
  30.           such as the start, parity and stop bits to provide the UART on
  31.           the other end of the serial data connection with an accurate
  32.           means for the re-assembly of the original data format.
  33.  
  34.             In the early days of serial communications, particularly that
  35.           involving data transmission via telephone lines, the speed at
  36.           which the data was transmitted wasn't particularly fast. This is
  37.           especially true with telephone lines. The normal voice-grade line
  38.           is extremely limited in it's sound-reproduction qualities. This
  39.           low bandwidth implied that any data must be transmitted very
  40.           slowly to avoid 'overloading' the line. For voice-grade lines,
  41.           the maximum reliable data rate was 300 baud, using the Bell 103
  42.           modem specification. (A modem translates the on/off binary pulses
  43.           into a tone so that the telephone line will treat it as regular
  44.           'voice' information.)
  45.  
  46.             The UART, of course had to be able to translate data at the
  47.           same rate in order for the system to work. Other serial devices
  48.           such as terminals and printers did not require a modem, but in
  49.           most cases the data rate was still quite slow, usually under
  50.           19,200 baud.
  51.  
  52.             In the PC, when using the serial port(s) directly, such as
  53.           sending a file to a serial printer, the 8250 UART (or the updated
  54.           16450 version) was more than able to keep up. Even in a
  55.           telecommunications link, the UART was still fast enough, since
  56.           the data over the phone line was relatively slow.
  57.  
  58.             Another point was that the early PC's weren't terribly fast.
  59.           This was made worse when running a communications program such as
  60.           ProComm or CrossTalk. Since the data rates were slow, there was
  61.           enough time for the computer to run the program instructions
  62.  
  63.  
  64.  
  65.                                                                      Page 1
  66.  
  67.  
  68.  
  69.  
  70.  
  71.                            16550 - A UART Control Program
  72.  
  73.  
  74.           while fetching the individual bytes as they came in over the
  75.           serial link. Even at 9600 baud, a very-well
  76.           written comm program was able to keep up with the data.
  77.  
  78.             Time progressed and technology improved serial communications
  79.           (particularly that of modems) to the point where extremely high
  80.           data rates could be achieved. The new V32.bis modems are capable
  81.           of transfer rates of up to 14,400 baud, and with the V42.bis
  82.           compression, data burst rates of over 57,000 baud are feasible.
  83.           Of course, software became more complex as well, but with a
  84.           price. The more complicated the software, the more time it takes
  85.           to handle the program instructions. Couple this with the fact
  86.           that the data is coming in at an extremely high rate, and you
  87.           have a potential problem on your hands!
  88.  
  89.             What typically happens is a data overrun occurs. This means
  90.           that there was still a byte of data left in the UART when the
  91.           next byte came in. Naturally, a loss of just one single byte is
  92.           enough to crash a program, so this is a very important concern!
  93.           One way around the problem is a handshake scheme, whereby the
  94.           transmitting computer holds off sending data until the receiving
  95.           end is ready. This works very well, but one major drawback is
  96.           that a great deal of time is wasted signalling instead of
  97.           transferring data.
  98.  
  99.             The 16550 UART gets around this bottlenecking by incorporating
  100.           a buffer directly in the chip itself. This buffer is designed to
  101.           hold up to 16 bytes (or characters) before an overrun occurs. The
  102.           buffer is arranged in a FIFO manner, meaning First In, First Out.
  103.           In programming terminology this is known as a queue. The 16550
  104.           UART also has improved circuitry which allows it the ability to
  105.           transmit data some 4 times faster than the old 8250! This high-
  106.           speed circuitry helps in the PC environment mainly in interrupt
  107.           timing, though the time saved is rather marginal. Of more
  108.           importance is the FIFO. By having a 'reserve' storage area on the
  109.           chip, if the processor is momentarily busy, (say, executing an
  110.           ANSII graphic sequence) the data is not lost, but held in the
  111.           buffer until the processor is free to receive it.
  112.  
  113.             The problem now lies in the fact that the majority of older
  114.           communications programs do not check for, and utilize the FIFO
  115.           capabilities of the 16550 chip. This is where the 16550 program
  116.           comes to the rescue!
  117.  
  118.           PROGRAM OPERATION:
  119.  
  120.             The 16550 UART initially powers up in a non-FIFO state. This
  121.           makes the UART software-compatible with the 16450, and the older
  122.           8250. In most cases, the communications software doesn't know the
  123.           difference. At least until the data comes in faster than the
  124.           program can process it!
  125.  
  126.             The 16550 program goes in and 'unlocks' the FIFO capabilities
  127.           in the UART, and even in a buffered state, the 16550 still looks
  128.  
  129.  
  130.  
  131.                                                                      Page 2
  132.  
  133.  
  134.  
  135.  
  136.  
  137.                            16550 - A UART Control Program
  138.  
  139.  
  140.           like the 16450 to older programs! If buffering occurs, then the
  141.           data is held, and subsequently read out at a relaxed pace
  142.           automatically, providing full compatibility with older software,
  143.           yet giving the high-speed protection of a data buffer!
  144.  
  145.           PROGRAM PARAMETERS:
  146.  
  147.             The 16550 automatically detects a 16550 UART, and provides
  148.           control for the COM port address, enabling and disabling of the
  149.           FIFO, and the settings for a special interrupt based upon the
  150.           number of characters being held in the FIFO buffer.
  151.  
  152.             Executing the program without specifying any parameters results
  153.           in a scan of all COM ports, and reports the presence of a 16550
  154.           UART in each. If the user knows that a 16550 device exists,
  155.           additional parameters may be specified to access the FIFO. These
  156.           parameters are as follows:
  157.  
  158.              COMn - Tells the 16550 program to use COM port n, where n
  159.                     indicates ports 1 through 4. Any value outside of this
  160.                     range results in an error. NOTE: A COM port MUST be
  161.                     specified when setting the UART!
  162.  
  163.                 ? - Echos a brief help text on the screen. No action is
  164.                     taken.
  165.  
  166.                /f - Enables the 16550 internal buffers.
  167.  
  168.                /r - Disables the 16550 internal buffers and resets the UART
  169.                     to the 8250/16450 compatibility mode.
  170.  
  171.               /tn - Allows the adjustment of the FIFO-full interrupt. n
  172.                     specifies the number of characters allowed in the
  173.                     buffer before an interrupt occurs. the values for n are
  174.                     1,4,8 and 14. NOTE: this is a very sensitive setting!
  175.                     For normal operation with old communications software,
  176.                     this parameter should not be used!
  177.  
  178.             The program defaults to FIFO disabled, and a /t parameter of 1.
  179.           If the command line parameters are valid, the program will verify
  180.           that a 16550 UART is present, and that the parameters have been
  181.           set. Unless another program that recognizes a 16550 UART is
  182.           executed, the UART should remain in the current state.
  183.  
  184.           SHAREWARE CONCEPT:
  185.  
  186.             Shareware is a non-conventional approach to software
  187.           distribution. Unlike regular commercial programs, shareware
  188.           allows a 'try-before-you-buy' approach. In most cases, the
  189.           programs are just as bit as good (if not better in some
  190.           instances!) as the programs you buy at a computer store.
  191.  
  192.             Shareware ISN'T freeware! In most cases, the software author is
  193.           a professional who makes at least part of his or her living on
  194.  
  195.  
  196.  
  197.                                                                      Page 3
  198.  
  199.  
  200.  
  201.  
  202.  
  203.                            16550 - A UART Control Program
  204.  
  205.  
  206.           the registration of the software program. Typically the user is
  207.           enticed into registration by added features, free updates, etc.
  208.  
  209.             Shareware depends upon the user to make it work. It's up to
  210.           you!
  211.  
  212.           Registration:
  213.  
  214.             This program is 'donate-ware', which is similar in concept to
  215.           shareware. The author makes no claims as being a professional
  216.           software engineer, rather, the author is a disabled hardware
  217.           engineer who enjoys tinkering with programs, and making the
  218.           hardware work better.
  219.  
  220.             If you find that this program is useful, and saves you some
  221.           time and headaches, the author would appreciate a $5.00 (US)
  222.           suggested donation. This amount would include a 'registered' copy
  223.           of the program (without the shareware notice), and the eternal
  224.           thanks from the author. Considering that the cost of new
  225.           communications software that recognizes the 16550 UART far
  226.           exceeds 5 bucks, you get a pretty good deal! Of course, any
  227.           amount is appreciated. Oh, please specify whether you want a
  228.           360K, 5-1/4" or 720K, 3-1/2" floppy when you register.
  229.  
  230.           .....and the address is:
  231.  
  232.                      Brent Turner
  233.                      P.O. Box 3612
  234.                      Fullerton, CA, 92634-3612
  235.  
  236.             NOTE: Foreign (non-US) users please include a few extra bucks
  237.           for the postage! Thanks.
  238.  
  239.           THE LEGAL STUFF:
  240.  
  241.             This software is distributed on an as-is basis. The author has
  242.           made reasonable attempts to ascertain it's performance, but
  243.           cannot guarantee that it will work in every instance. The author
  244.           is not responsible for any damages, or loss of data resulting
  245.           from the use of this program.
  246.  
  247.             The shareware version of this program may be freely distributed
  248.           as long as all files are included in the package. The registered
  249.           version may not be copied or duplicated.
  250.  
  251.             Shareware vendors may distribute this program as long as the
  252.           cost per disk does not exceed $5.00. This program may be included
  253.           (bundled) with other programs of like nature, so long as the
  254.           above cost-per-disk stipulation is met.
  255.  
  256.             The original source code is not available.
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.                                                                      Page 4
  264.  
  265.